Selects a database and executes a query on it - PHP The MySQL query. ... Returns a positive MySQL result resource to the query result, or FALSE on error. ... Example #1 mysql_db_query() alternative example.